<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <input type="text" id="num1" value="10">
    <input type="text" id="num2" value="20">
    <input type="text" id="res">
    <script>
        var num1Box = document.getElementById('num1')
        var num2Box = document.getElementById('num2')
        var resBox = document.getElementById('res')
        // 将两个文本框的值进行乘法运算
        var num1 = num1Box.value // 将'10'赋值给变量num1
        var num2 = num2Box.value // 将'20'赋值给变量num2
        res.value = num1 * num2 // 将200赋值给res.value
        res.value = num1 + num2 // '10' + '20' => '1020'
    </script>
</body>
</html>